﻿using Face8280WebSocketServer.Interface;
using Face8280WebSocketServer.Utility.VerifyAttribute;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace Face8280WebSocketServer.Controllers.FaceDevice
{
    /// <summary>
    /// 查询设备的参数
    /// </summary>
    public class DeviceAccessQueryParameter : DeviceQueryParameter
    {
        /// <summary>
        /// 人员编号（数字<20位）
        /// </summary>
        [VerifyLong(iMax: UInt32.MaxValue, iMin: 0,
                errCode: 3, sErrorDesc: "人员编号超出范围(1-4294967295)")]
        public long EmployeeID { get; set; } //是
        /// <summary>
        /// 人员姓名（字符<30位）
        /// </summary>
        [VerifyText(iMax: 30, iMin: 1, required: false,
            errCode: 4, sErrorDesc: "人员姓名由1-30个字符组成")]
        public string EmployeeName { get; set; } //是
        /// <summary>
        /// 职务
        /// </summary>
        //[VerifyText(iMax: 30, iMin: 0, required: false,
        //    errCode: 5, sErrorDesc: "职务长度不能超过30个字")]
        //public string EmployeeJob { get; set; } //否

        ///// <summary>
        ///// IC卡号 纯数字
        ///// </summary>
        //[VerifyLong(iMax: UInt64.MaxValue, iMin: 0,
        //        errCode: 6, sErrorDesc: "IC卡号超出范围(1-4294967295)")]
        public ulong EmployeeIC { get; set; } //否

        /// <summary>
        /// 联系方式
        /// </summary>
        //[VerifyText(iMax: 30, iMin: 0, required: false,
        //    errCode: 7, sErrorDesc: "联系方式长度不能超过30个字")]
        //public string EmployeePhone { get; set; } //否


        /// <summary>
        /// 人员角色 0,普通人员；1，管理员
        /// </summary>
        [VerifyNumRange(iRange: new int[] { 0, 1, 2, 255 },
                       errCode: 4, sErrorDesc: "人员角色类型错误，0,普通人员；1，管理员；2--黑名单； 255 所有")]
        public int EmployeeRoot { get; set; }


        /// <summary>
        /// 上传状态：0--未上传；1--已上传；2--待删除 255-不查询
        /// </summary>
        [VerifyNumRange(iRange: new int[] { 0, 1, 2, 255 },
                       errCode: 4, sErrorDesc: "上传状态：0--未上传；1--已上传；2--待删除 255-不查询")]
        public int UploadStatus { get; set; }


        /// <summary>
        /// 上传结果：0--未上传；1--正常；2--待删除 255-不查询 254-有异常
        /// </summary>
        [VerifyNumRange(iRange: new int[] { 0, 1, 254, 255 },
                       errCode: 4, sErrorDesc: "上传结果 0--未上传；1--正常；2--待删除 255-不查询 254-有异常")]
        public int UploadResult { get; set; }


    }
}
